# -*- makefile -*-

$(eval $(call Include,$/mt19937ar/))
$(eval $(call Include,$/kazlib/))

src    := $/bigQueue.C \
          $/bigQueue.H \
          $/bitOperations.h \
          $/bitPackedArray.C \
          $/bitPackedArray.H \
          $/bitPackedFile.C \
          $/bitPackedFile.H \
          $/bitPacking.h \
          $/eliasDeltaEncoding.h \
          $/eliasGammaEncoding.h \
          $/endianess.H \
          $/fibonacciEncoding.h \
          $/fibonacciNumbers.C \
          $/file.c \
          $/generalizedUnaryEncoding.h \
          $/intervalList.H \
          $/logMsg.H \
          $/md5.c \
          $/palloc.c \
          $/qsort_mt.c \
          $/readBuffer.C \
          $/readBuffer.H \
          $/recordFile.C \
          $/recordFile.H \
          $/speedCounter.C \
          $/speedCounter.H \
          $/splitToWords.H \
          $/sweatShop.C \
          $/sweatShop.H \
          $/uint32List.H \
          $/unaryEncoding.h \
          $/util++.H \
          $/util.c \
          $/util.h

# Broken
#          $/bzipBuffer.C
#          $/bzipBuffer.H

# Executables
#          $/unaryEncodingTester.C


$/.C_SRCS    :=$(filter %.c,${src})
$/.CXX_SRCS  :=$(filter %.C,${src})
$/.CXX_INCS  :=$(filter %.H,${src}) $(filter %.h,${src})
$/.CXX_LIBS  :=$/libutil.a

$/.CLEAN := $/*.o

$/libutil.a: ${$/.C_SRCS:.c=.o} ${$/.CXX_SRCS:.C=.o} \
	$/mt19937ar/mt19937ar.o \
        $/kazlib/dict.o \
        $/kazlib/except.o \
        $/kazlib/hash.o \
        $/kazlib/list.o \
        $/kazlib/sfx.o
